package com.guchenbo.study.mvc.servlet31.springboot.jar;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author guchenbo
 * @Date 2019/11/30.
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {
    protected static final Logger log = LoggerFactory.getLogger(UserController.class);
    @Resource
    private StudyService studyService;

    public UserController() {
    }

    @RequestMapping(value = "/post")
    public User post(@RequestBody User user) {
        log.info("user name: {}, age:{}, age2:{}", user.getName(), user.getAge(), user.getAge2());
        return user;
    }
}
